<?php


//用普通方法做一个累加的效果

class Computer{
	//字段
	public $_count=0;
	//累加的方法
	public function _add(){
        return $this->_count++;
	}
}

$computer1 = new Computer();
$computer1->_add();
$computer1->_add();
$computer1->_add();//累加3次后打印结果
echo $computer1->_count;

echo '<br/>';


$computer2 = new Computer();
$computer2->_add();
$computer2->_add();
$computer2->_add();//累加3次后打印结果
echo $computer2->_count;



//正常情况下，两次执行的结果一样等于3























